#二分查找法前提是有序序列 无序不适用
def binSerch(arr,target):
    left,right = 0,len(arr)-1
    arr.sort()
    while left <= right:
        middle = (left + right)//2
        if target == arr[middle]:
            return middle
        if target > arr[middle]:
            left = middle + 1
        if target < arr[middle]:
            right = middle - 1

a = binSerch([53,93,36,55,18,28,14,14,82,37],55)
print(a)